package com.namecard.namecardapi.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.namecard.namecardapi.entity.OrderInfo;
import com.namecard.namecardapi.entity.vo.OrderCardInfoVO;
import com.namecard.namecardapi.entity.vo.OrderListVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author wzx
 * @since 2023-07-03
 */
@Mapper
public interface OrderInfoMapper extends BaseMapper<OrderInfo> {

    /**
     查询展示未支付订单列表
     */
    List<OrderListVO> getNoPayOrderList(@Param("userId") String userId);

    /**
     查询展示已经支付订单列表
     */
    List<OrderCardInfoVO> getOrderList(@Param("userId") String userId);

    /**
     * 根据userId查订单
     */
    List<OrderInfo> getPayedOrderByUserid(String userId);
}
